package com.steerinfo;

import feign.Retryer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @Author zhangnan
 * @Date 2021/4/21 14:32
 * @Version 1.0
 */
@SpringBootApplication
@ServletComponentScan
@MapperScan({"com.steerinfo.dil.mapper"})
@EnableFeignClients(basePackages = "com.steerinfo.dil.feign")
@EnableDiscoveryClient
public class DilApplicationMain {
    public static void main(String[] args) {
        SpringApplication.run(DilApplicationMain.class,args);
    }
    @Bean
    public Retryer feignRetryer() {
        // 这里使用一个永不重试的Retryer
        return Retryer.NEVER_RETRY;
    }
}